package com.itheima.mybatis_plus.service;

import com.itheima.mybatis_plus.dao.StudentMapper;
import com.itheima.mybatis_plus.entity.Course;
import com.itheima.mybatis_plus.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService {

    @Autowired
    private StudentMapper studentMapper;

    /**
     * 查询所有记录
     *
     * @return 返回集合，没有返回空List
     */
    public List<Student> listAll() {
    	return studentMapper.listAll();
    }
    public List<Student> stuAndCourseAll(){
        return  studentMapper.stuAndCourseAll();
    }

    /**
     * 根据主键查询
     *
     * @param id 主键
     * @return 返回记录，没有返回null
     */
	
}